#include <asm/processor-ca15.h>
#include <asm/gic.h>
+#include <asm/platform.h>
#include "vtimer.h"
#include "vuart.h"
if ( (rc = vcpu_domain_init(d)) != 0 )
goto fail;
- /* XXX dom0 needs more intelligent selection of PPI */
- d->arch.evtchn_irq = GUEST_EVTCHN_PPI;
+ if ( d->domain_id )
+ d->arch.evtchn_irq = GUEST_EVTCHN_PPI;
+ else
+ d->arch.evtchn_irq = platform_dom0_evtchn_ppi();
/*
* Virtual UART is only used by linux early printk and decompress code.
return dt_match_node(blacklist, node);
}
+unsigned int platform_dom0_evtchn_ppi(void)
+{
+ if ( platform && platform->dom0_evtchn_ppi )
+ return platform->dom0_evtchn_ppi;
+ return GUEST_EVTCHN_PPI;
+}
+
/*
* Local variables:
* mode: C
PLATFORM_START(xgene_storm, "APM X-GENE STORM")
.compatible = xgene_storm_dt_compat,
.quirks = xgene_storm_quirks,
+ .dom0_evtchn_ppi = 24,
PLATFORM_END
/*
* List of devices which must not pass-through to a guest
*/
const struct dt_device_match *blacklist_dev;
+ /*
+ * The IRQ (PPI) to use to inject event channels to dom0.
+ */
+ unsigned int dom0_evtchn_ppi;
};
/*
void platform_poweroff(void);
bool_t platform_has_quirk(uint32_t quirk);
bool_t platform_device_is_blacklisted(const struct dt_device_node *node);
+unsigned int platform_dom0_evtchn_ppi(void);
#define PLATFORM_START(_name, _namestr) \
static const struct platform_desc __plat_desc_##_name __used \